<html>
<head><meta charset="utf-8"><title>Moving forward with the RFC · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html">Moving forward with the RFC</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185297532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185297532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185297532">(Jan 10 2020 at 10:20)</a>:</h4>
<p>At this point the draft RFC is almost ready. The last issue that needs to be resolved is <a href="https://github.com/rust-lang/project-inline-asm/issues/5" target="_blank" title="https://github.com/rust-lang/project-inline-asm/issues/5">rust-lang/project-inline-asm#5</a>.</p>



<a name="185297567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185297567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185297567">(Jan 10 2020 at 10:21)</a>:</h4>
<p>Basically we need a specification for what implicit state inline asm is/isn't allowed to modify.</p>



<a name="185297577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185297577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185297577">(Jan 10 2020 at 10:21)</a>:</h4>
<p>And define the exact semantics of <code>preserves_flags</code>.</p>



<a name="185304977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185304977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185304977">(Jan 10 2020 at 12:18)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> i'm not sure what to think about that</p>



<a name="185305009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305009">(Jan 10 2020 at 12:19)</a>:</h4>
<p>on one hand, we want to tell the compiler to assume the worst about <code>asm!</code> blocks, to prevent mistakes, like the user forgetting to write <code>invalidates_flags</code></p>



<a name="185305025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305025">(Jan 10 2020 at 12:19)</a>:</h4>
<p>(which is why <code>preserves_flags</code> is an extra guarantee)</p>



<a name="185305083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305083">(Jan 10 2020 at 12:20)</a>:</h4>
<p>on the other, it would be simpler to just say that an <code>asm!</code> can do the same things as an unknown function call, but I guess that defeats the point</p>



<a name="185305130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305130">(Jan 10 2020 at 12:20)</a>:</h4>
<p>its unclear to me how not writing <code>preserves_flags</code> would work</p>



<a name="185305158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305158">(Jan 10 2020 at 12:21)</a>:</h4>
<p>does it mean that <code>asm!("...modifies flags..."); asm!("...assert modification or panic...")</code> is guaranteed to "never panic" ?</p>



<a name="185305179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305179">(Jan 10 2020 at 12:22)</a>:</h4>
<p>afaict llvm could modify the flags between both <code>asm!</code> statements</p>



<a name="185305256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185305256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185305256">(Jan 10 2020 at 12:22)</a>:</h4>
<p>or maybe worse, insert some code in-between that assumes that these flags have not been modified</p>



<a name="185306638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185306638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185306638">(Jan 10 2020 at 12:44)</a>:</h4>
<p>Basically <code>preserves_flags</code> is intended as the inverse of the <code>"cc"</code> clobber.</p>



<a name="185341190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185341190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185341190">(Jan 10 2020 at 19:12)</a>:</h4>
<p>If I wanted to leave some questions/feedback on the pre-RFC in the repo there, is opening an issue in the repo the best place to do that?</p>



<a name="185349362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185349362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185349362">(Jan 10 2020 at 20:43)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> Yes, please do.</p>



<a name="185406802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185406802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185406802">(Jan 11 2020 at 21:56)</a>:</h4>
<p>OK I just posted <a href="https://github.com/rust-lang/project-inline-asm/issues/10" target="_blank" title="https://github.com/rust-lang/project-inline-asm/issues/10">rust-lang/project-inline-asm#10</a>, which fixes our last unresolved issue.</p>



<a name="185406820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185406820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185406820">(Jan 11 2020 at 21:57)</a>:</h4>
<p>I'll publish the RFC once it is merged, so if you have any feedback in mind please say so now.</p>



<a name="185406826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185406826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185406826">(Jan 11 2020 at 21:57)</a>:</h4>
<p>Don't worry if you miss it, there is still the possibility of providing feedback during the official RFC process.</p>



<a name="185442028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185442028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185442028">(Jan 12 2020 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> Since you're the lang team liason, do you have any objections to publishing the RFC once <a href="https://github.com/rust-lang/project-inline-asm/issues/10" target="_blank" title="https://github.com/rust-lang/project-inline-asm/issues/10">rust-lang/project-inline-asm#10</a> is merged?</p>



<a name="185502846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185502846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185502846">(Jan 13 2020 at 15:24)</a>:</h4>
<p>The RFC is now up at <a href="https://github.com/rust-lang/rfcs/issues/2850" target="_blank" title="https://github.com/rust-lang/rfcs/issues/2850">rust-lang/rfcs#2850</a>!</p>



<a name="185527903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185527903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185527903">(Jan 13 2020 at 19:27)</a>:</h4>
<p>Ah, I didn't realize the rfc was about to be published so I didn't rush :P I've just left some comments on the rfc</p>



<a name="185740661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/185740661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#185740661">(Jan 15 2020 at 20:30)</a>:</h4>
<p>Sorry that I didn't see this message, but the answer at the time was "no, no objections, go ahead". :)</p>



<a name="186115587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115587">(Jan 20 2020 at 16:24)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> what happens with backends that do not support inline assembly for a particular target ?</p>



<a name="186115602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115602">(Jan 20 2020 at 16:24)</a>:</h4>
<p>The RFC mentions that we can always implement inline assembly without backend support</p>



<a name="186115613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115613">(Jan 20 2020 at 16:25)</a>:</h4>
<p>but my question is more: what happens until somebody implements that?</p>



<a name="186115640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115640">(Jan 20 2020 at 16:25)</a>:</h4>
<p>Trying to use the backend for that target should fail, but the RFC does not say</p>



<a name="186115709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115709">(Jan 20 2020 at 16:26)</a>:</h4>
<p>I expect it to be possible to use such Rust backends to compile Rust programs, as long as these programs do not try to use anything that uses <code>asm!</code></p>



<a name="186115724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186115724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186115724">(Jan 20 2020 at 16:26)</a>:</h4>
<p>but if they try to use <code>asm!</code>, then I expect a nice error</p>



<a name="186120093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186120093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186120093">(Jan 20 2020 at 17:22)</a>:</h4>
<p>I expect that adding fallback asm support would be a requirement to adding new backends if they don't support inline asm</p>



<a name="186120107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186120107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186120107">(Jan 20 2020 at 17:22)</a>:</h4>
<p>Basically, I don't want asm! to depend on the particular backend in use.</p>



<a name="186120114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186120114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186120114">(Jan 20 2020 at 17:22)</a>:</h4>
<p>It should just work.</p>



<a name="186120123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186120123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186120123">(Jan 20 2020 at 17:23)</a>:</h4>
<p>That sounds like the opposite of a good time</p>



<a name="186123412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123412">(Jan 20 2020 at 18:17)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> that means that we need to break powerpc, sparc64, wasm, and all other targets on stable Rust the moment <code>asm!</code> gets stabilized</p>



<a name="186123414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123414">(Jan 20 2020 at 18:17)</a>:</h4>
<p>or</p>



<a name="186123426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123426">(Jan 20 2020 at 18:17)</a>:</h4>
<p>that we can't stabilize <code>asm!</code> until all currently supported targets on stable using the LLVM wrapper work</p>



<a name="186123506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123506">(Jan 20 2020 at 18:18)</a>:</h4>
<p>(that requires submitting RFCs implementing <code>asm!</code> for all targets currently supported on stable, which are many)</p>



<a name="186123543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123543">(Jan 20 2020 at 18:19)</a>:</h4>
<p>notice that I'm not talking about backends</p>



<a name="186123549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123549">(Jan 20 2020 at 18:19)</a>:</h4>
<p>I'm talking about targets within a backend</p>



<a name="186123632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123632">(Jan 20 2020 at 18:20)</a>:</h4>
<p>e.g., if LLVM adds support for a new target, then a rust LLVM upgrade must be blocked on either implementing <code>asm!</code> for that target, or implementing a check that rejects that target</p>



<a name="186123680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123680">(Jan 20 2020 at 18:21)</a>:</h4>
<p>for LLVM this might be minor, but the amount of work required to support a new target for cranelift isn't minor</p>



<a name="186123700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123700">(Jan 20 2020 at 18:21)</a>:</h4>
<p>this means that as backends add support for new targets, we'll be blocking being able to use them from Rust until somebody implements <code>asm!</code> support for them</p>



<a name="186123703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123703">(Jan 20 2020 at 18:21)</a>:</h4>
<p>that seems unreasonable</p>



<a name="186123937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123937">(Jan 20 2020 at 18:25)</a>:</h4>
<p>We can stabilize asm! for different architectures separately.</p>



<a name="186123967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186123967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186123967">(Jan 20 2020 at 18:25)</a>:</h4>
<p>Keep in mind the new asm! need specific rustc support for each architecture, so an LLVM upgrade won't break existing targets.</p>



<a name="186124042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124042">(Jan 20 2020 at 18:26)</a>:</h4>
<p>The way I see it working is that initially cranelift will use the external assembler for all targets, and as support is added then some of these will switch to the builtin cranelift support/</p>



<a name="186124389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124389">(Jan 20 2020 at 18:32)</a>:</h4>
<p>So... suppose we stabilize asm! for RISC-V</p>



<a name="186124398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124398">(Jan 20 2020 at 18:32)</a>:</h4>
<p>and that works, because we can only use the LLVM backed for RISC-V</p>



<a name="186124403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124403">(Jan 20 2020 at 18:32)</a>:</h4>
<p>then Cranelift adds support for RISC-V, and cranelift does not support inline assembly</p>



<a name="186124427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124427">(Jan 20 2020 at 18:33)</a>:</h4>
<p>we upgrade Cranelift in rustc, shall we block the Cranelift upgrade on adding either support for <code>asm!</code> on cranelift for RISC-V or on forbidding users of the Cranelift backed to target RISC-V after the upgrade?</p>



<a name="186124532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124532">(Jan 20 2020 at 18:34)</a>:</h4>
<p>even if we were to use the external assembly for cranelift, we would need to add support to rustc for using an external assembler for riscv</p>



<a name="186124566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186124566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186124566">(Jan 20 2020 at 18:35)</a>:</h4>
<p>since we did not need that for the LLVM backend, and I doubt one can "reuse" the code for other assemblers, since each assembly language for each target is sufficiently different</p>



<a name="186126530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186126530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186126530">(Jan 20 2020 at 19:10)</a>:</h4>
<p>I don't expect the external assembler part to be too difficult. It is indeed arch-specific, but it shouldn't be too difficult to port once the initial support has been implemented.</p>



<a name="186131209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186131209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186131209">(Jan 20 2020 at 20:32)</a>:</h4>
<p>It seems far better to make <code>asm!</code> a "bonus" ability for a target to have, and not block adding a target based on <code>asm!</code> being supported or not. The same as we would not block a new target based on complete <code>core::arch</code> support or not.</p>



<a name="186132539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186132539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186132539">(Jan 20 2020 at 20:57)</a>:</h4>
<p>er, target yes, I think (maybe fits into "tiers" in some sense), but I believe <span class="user-mention" data-user-id="143274">@Amanieu</span> is more so talking about codegen backends</p>



<a name="186132566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186132566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186132566">(Jan 20 2020 at 20:57)</a>:</h4>
<p>i.e., we would expect all codegen backends to support asm (in some fashion), but maybe some non-tier 1 targets don't</p>



<a name="186132576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186132576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186132576">(Jan 20 2020 at 20:57)</a>:</h4>
<p>and I think that fits into assembly well overall anyway, right? Since for e.g. ARM you'd need different assembly presumably?</p>



<a name="186133957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186133957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186133957">(Jan 20 2020 at 21:19)</a>:</h4>
<p>(Also we should maybe try to be extra clear going forward in this thread what is a requirement for rust the language, in terms of being a compliant compiler of that language, and what's a requirement for rustc itself, being a specific compiler of that language.</p>
<p>And then with that distinction we can also question what non-rustc compilers, such as Cranelift and any other future compilers, would have to do to be considered a working rust compiler.)</p>



<a name="186135012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186135012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186135012">(Jan 20 2020 at 21:37)</a>:</h4>
<p>I don't think that distinction is meaningful at this point; there is really only one Rust compiler.</p>



<a name="186135017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186135017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186135017">(Jan 20 2020 at 21:37)</a>:</h4>
<p>or at least I don't see how anything I've seen so far is affected by it</p>



<a name="186142814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186142814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186142814">(Jan 21 2020 at 00:18)</a>:</h4>
<p>people have definitely been concerned this whole time how any of this affects Cranelift.</p>



<a name="186147976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186147976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186147976">(Jan 21 2020 at 02:38)</a>:</h4>
<p>Sure - but that's not an issue of language spec or not, I think? i.e. we're only ever discussing basically language spec</p>



<a name="186153021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186153021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186153021">(Jan 21 2020 at 04:44)</a>:</h4>
<p>Amanieu said "we can stabilize <code>asm!</code> for different targets separately", and that is pretty obviously a statement of proposed Mozilla Rustc policy. That clearly can't be language spec policy. The language itself either contains <code>asm!</code> or not. Those are the only two possible states. Beyond that the support level per compilation target is a compiler specific concern.</p>
<p>You mentioned non-tier 1 targets, but the entire tier target policy is also a Mozilla Rustc concern, I don't think that Cranelift or any other compiler needs to subscribe to the same tiering or tier qualifications as Mozilla Rustc uses.</p>
<p>So it's a totally fair question to ask for clarification to the question of "what happens when a compiler doesn't support inline <code>asm!</code> on a given target?" And the answer is going to be a little bit language spec and a lot bit Mozilla Rustc, and then other compiler projects are going to have to decide what they want to do as well based on the little bit that's language spec.</p>



<a name="186194442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186194442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186194442">(Jan 21 2020 at 15:36)</a>:</h4>
<p>A bit tangential, but that question goes beyond <code>asm!</code>. For example, mrustc doesn't currently support borrow checking — is it "a Rust compiler"?</p>



<a name="186205120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186205120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186205120">(Jan 21 2020 at 17:17)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> Please don't use the phrase "Mozilla rustc". There's only the one rustc, and it's not a Mozilla project, it's the compiler built by the Rust community.</p>



<a name="186205245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186205245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186205245">(Jan 21 2020 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> If you really want to distinguish between "the Rust compiler" and "the Rust language" (as theoretically implementable by another compiler), by all means, but the Rust compiler is not owned by Mozilla or any other company.</p>



<a name="186205518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186205518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186205518">(Jan 21 2020 at 17:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> IIn a literal sense, mrustc is a simplistic Rust compiler for an old version of Rust, but it's missing a critical piece of error-checking for incorrect code. (That doesn't make it an uninteresting project; on the contrary, it's interesting for bootstrapping without needing ocaml, and for doing diverse double-compilation.)  In a more practical sense, mrustc is never going to define the Rust language, and will almost certainly always lag the Rust compiler. Its limitations are not Rust language limitations.</p>



<a name="186207259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186207259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186207259">(Jan 21 2020 at 17:39)</a>:</h4>
<p>"mozilla rustc" is just the term that some folks used in the Rust Foundation Proposal topic on internals. Specifically the point was made that any alternative rust compiler wishing to work with standard tooling would likely have to take on the name <code>rustc</code> the same as various java compilers all use <code>javac</code> as their installed name.</p>



<a name="186207532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186207532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186207532">(Jan 21 2020 at 17:42)</a>:</h4>
<p>A compiler that wanted to install itself as <code>rustc</code> would need to support not only Rust as implemented by the Rust compiler, but also the <code>rustc</code> command-line interface. That's theoretically possible, but seems vanishingly unlikely.</p>



<a name="186207570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186207570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186207570">(Jan 21 2020 at 17:43)</a>:</h4>
<p>Ever since Java became Open Source, alternative Java compilers have become far far less common. Alternative implementations of a compiler are far more critical when the primary implementation isn't open.</p>



<a name="186207727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186207727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186207727">(Jan 21 2020 at 17:45)</a>:</h4>
<p>I'm not saying someone <em>can't</em> implement another Rust compiler, just that doing so and calling it <code>rustc</code> doesn't seem especially useful (and seems more likely to generate confusion than compatibility).</p>



<a name="186207821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186207821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186207821">(Jan 21 2020 at 17:46)</a>:</h4>
<p>In any case, we're trying very hard to <em>avoid</em> the incorrect perception that Rust is a Mozilla project, and I'm asking to please avoid terminology that contributes to that perception.</p>



<a name="186208214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186208214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186208214">(Jan 21 2020 at 17:49)</a>:</h4>
<p>rust project rustc it is</p>



<a name="186208344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186208344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186208344">(Jan 21 2020 at 17:50)</a>:</h4>
<p>Thank you, that's an improvement. :)</p>



<a name="186210113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186210113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186210113">(Jan 21 2020 at 18:08)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> that makes sense, but I fear you went too deeply into my concrete example, so let's use a hypothetical: I clone <code>rust-lang/rust</code> and find the secret "run the borrow checker" flag, set it to false, and publish that compiler. Is it "a Rust compiler"? Replace "run the borrow checker" with any given aspect of what we generally consider "Rust".</p>
<p>Ultimately, it's the line between language spec and implementation, which we know is not as well defined as we'd like right now.</p>



<a name="186210414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186210414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186210414">(Jan 21 2020 at 18:11)</a>:</h4>
<p>It would be a Rust compiler, specifically a Rust compiler that nobody should use, it would be a misleading thing to do to continue calling it "rustc", and most importantly, the capabilities of that compiler should not affect what we describe as "Rust" when we talk about the Rust language.</p>



<a name="186210638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186210638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186210638">(Jan 21 2020 at 18:14)</a>:</h4>
<p>To more directly answer the distinction you're making:</p>



<a name="186210903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186210903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186210903">(Jan 21 2020 at 18:17)</a>:</h4>
<p>I think there's value in having a Rust language specification, to help people understand and reason about the language.</p>



<a name="186211030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186211030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186211030">(Jan 21 2020 at 18:19)</a>:</h4>
<p>I don't think that the language specification, by itself, is what people should anchor to in an alternate implementation. And in particular, I think in practice someone would want to say "Rust as implemented by rustc 1.x", not "Rust as defined in the 1.x language specification". If those turned out to differ, it would be just as likely to be a bug in the language specification as a bug in rustc.</p>



<a name="186213343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186213343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186213343">(Jan 21 2020 at 18:42)</a>:</h4>
<p>Well I don't think we'd update a language spec every 6 weeks</p>



<a name="186213503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186213503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186213503">(Jan 21 2020 at 18:44)</a>:</h4>
<p>so, like with C++ or Haskell or pick your favorite, i expect the language specification would get some definition, then anything going into a rust compiler after that would be not in the spec until some update point when we edit the spec after X years of experimentation</p>



<a name="186214050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214050">(Jan 21 2020 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> I really hope that once we have a language specification we update the language specification every time we change the language.</p>



<a name="186214064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214064">(Jan 21 2020 at 18:49)</a>:</h4>
<p>I'm hoping it lives <em>in</em> the rust repository.</p>



<a name="186214124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214124">(Jan 21 2020 at 18:50)</a>:</h4>
<p>oof</p>



<a name="186214135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214135">(Jan 21 2020 at 18:50)</a>:</h4>
<p>(I sincerely hope that anyone talking about a "language specification" here is referring to a document, not something from ANSI or ISO or similar.)</p>



<a name="186214239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214239">(Jan 21 2020 at 18:51)</a>:</h4>
<p>Why would we <em>want</em> a language specification to lag the actual language?</p>



<a name="186214693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214693">(Jan 21 2020 at 18:56)</a>:</h4>
<p>that's a whole other thing that feels way off topic to the inline assembly RFC :3</p>



<a name="186214998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186214998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186214998">(Jan 21 2020 at 18:59)</a>:</h4>
<p>That's certainly true. :)</p>



<a name="186304526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186304526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186304526">(Jan 22 2020 at 16:38)</a>:</h4>
<blockquote>
<p>that makes sense, but I fear you went too deeply into my concrete example, so let's use a hypothetical: I clone rust-lang/rust and find the secret "run the borrow checker" flag, set it to false, and publish that compiler. Is it "a Rust compiler"? Replace "run the borrow checker" with any given aspect of what we generally consider "Rust".</p>
</blockquote>
<p>I don't think it is a Rust compiler if it allows more or less programs than the spec allows</p>



<a name="186304552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186304552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186304552">(Jan 22 2020 at 16:38)</a>:</h4>
<p>at least it's not a Rust compiler for that version of the spec</p>



<a name="186304577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186304577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186304577">(Jan 22 2020 at 16:39)</a>:</h4>
<p>So I don't think mrustc is a Rust compiler, though a useful tool nonetheless</p>



<a name="186304642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186304642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186304642">(Jan 22 2020 at 16:39)</a>:</h4>
<blockquote>
<p>I'm hoping it lives in the rust repository.</p>
</blockquote>
<p>Well, <code>rust-lang/{reference, spec}</code>, but close enough? ;)</p>



<a name="186332884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186332884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186332884">(Jan 22 2020 at 21:29)</a>:</h4>
<p>Most C compilers allow more than the spec allows, and we still call them C compilers.</p>



<a name="186338373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186338373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186338373">(Jan 22 2020 at 22:30)</a>:</h4>
<p>Here (as in most cases), C is a motivating example of what not to replicate, in my view</p>



<a name="186345946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186345946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186345946">(Jan 23 2020 at 00:16)</a>:</h4>
<p>Well I guess GHC isn't a Haskell compiler either then ;3c</p>



<a name="186347592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186347592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186347592">(Jan 23 2020 at 00:47)</a>:</h4>
<p>GHC is basically the only Haskell compiler used in production, and Haskell is more of a research language than Rust, so I think the situation is not comparable</p>



<a name="186357593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Moving%20forward%20with%20the%20RFC/near/186357593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Moving.20forward.20with.20the.20RFC.html#186357593">(Jan 23 2020 at 04:57)</a>:</h4>
<p>I think it might be a bit far to say that mrustc isn't a Rust compiler. That doesn't seem like an especially helpful definition, semantically. I would more say that rust-lang/rust defines Rust, and mrustc implements only a subset of Rust. mrustc or any other Rust implementation doesn't define what Rust is, or the limitations or capabilities of Rust.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>